<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>	
		<title>工作计划</title>
		<link href="<%=contextPath%>/css/search_v3.css" rel="stylesheet" type="text/css" />
		<link href="<%=contextPath%>/css/common.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=contextPath%>/js/validator.js"></script>
		<script language="javascript" src="<%=contextPath%>/js/func.js"type=""></script>
		<script type="text/javascript" src="<%=contextPath%>/js/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript" src="<%=contextPath%>/js/advanceSearch.js"></script>
		<link rel="stylesheet" href="<%=contextPath%>/ext3/resources/css/ext-all.css" type="text/css"   />
        <script src="<%=contextPath%>/ext3/adapter/ext/ext-base.js"></script>
        <script src="<%=contextPath%>/ext3/ext-all.js"></script>
	
		<script type="text/javascript">
		Ext.onReady(function(){
				var tb = new Ext.Toolbar({
			   		renderTo: document.all.tbar,
			    	items: [
				       {
				            text: '保存',
				            icon:"<%=contextPath%>/images/fanhui.png",
				            handler:function(){
				            	comt();
				            }
				        },'-',
				        {
				            text: '返回',
				            icon:"<%=contextPath%>/images/fanhui.png",
				            handler:function(){
				            	back();
				            }
				        }
			    	]
			    });
			});
			
			function getprojectinfo(){
			window.open("<%=contextPath%>/projectImplement!findByUnitno.do", '统计表格', 'height=300, width=350, top=200, left=300, toolbar=no, menubar=no');
			// document.frmM.action = "<%=contextPath%>/projectImplement!findByUnitno";
			}
		</script>
	</head>
  
  <body topmargin="0">
  <div id = "tbar"></div>
  <center>
			<!-- 信息提示 -->
			<div result><font color="red">${info }</font></div>
		</center>
 		<form id="frmM" class="ct" name="frmM" method="POST" action="<%=contextPath%>/projectImplement!save.do">
			<s:hidden name="projectImplement.id" />	
			<s:hidden name="projectImplement.unitid" />	
			<c:if test='${empty projectImplement.zxstate}'><input type="hidden" name="projectImplement.zxstate" id="projectImplement.zxstate"  value="1" />				 
			</c:if>
			<c:if test='${!empty projectImplement.zxstate}'><input type="hidden" name="projectImplement.zxstate" id="projectImplement.zxstate"  value="${projectImplement.zxstate}" />				 
			</c:if>
			<table width="100%"  id="infotab" >
				<tr>
					<th width="18%" align="left" class="ct"  > 开始日期：</th>
					<td width="31%" >
				      <s:textfield name="projectRecord.projectno"  datatype="Require" onclick ="aaa()" maxlength="50" size="25" msg="项目编号必须输入。" /></td>
					<th width="22%" class="ct">结束日期：</th>
					<td width="29%" >
				       <s:textfield name="projectRecord.projectname"  datatype="Require" maxlength="50" size="25" msg="项目名称必须输入。" /></td>
				</tr>
				<tr>
					<th align="left" >变电站：</th>
					<td  >
						<s:select  id="projectRecord.projectlevel"  name="projectRecord.projectlevel" list="#{'1':'省级','2':'市级'}" listKey="key" listValue="value" /></td>
					<th >电压等级：</th>
					<td  >
						<s:textfield name="projectRecord.organizer"  datatype="Require" maxlength="50" size="25" msg="主办单位必须输入。" /></td>
				</tr>
				<tr>
					<th align="left" >停电范围：</th>
					<td  >
						<s:textfield name="projectRecord.unitcode" maxlength="50" size="25" /></td>
					<th >设备类型</th>
					<td  >
						<s:textfield name="projectRecord.unitname" maxlength="50" size="25" /></td>
				</tr>
			
				<tr>
					<th align="left" >工作项目：</th>
					<td colspan="3" >
						<s:textfield name="projectRecord.directorName"  datatype="Require" maxlength="50" size="25" msg="项目负责人必须输入。" /></td>
				</tr>
				<tr>
					<th align="left" >备注： </th>  
					<td colspan="3" >
						<s:textfield name="projectRecord.thevenue"  datatype="Require" maxlength="50" size="25" msg="当年举办地点必须输入。" /></td>
				</tr>
				<tr align="left">
					<th colspan="4" >工作组织</th>
   </tr>
				<tr>
					<th align="left" >变电检修班</th>
					<td >
						<s:textfield name="projectRecord.hostingDays"  datatype="Number" maxlength="50" size="25" msg="当年举办期限必须输入整数。" /></td>
					<th >&nbsp;</th>
					<td >
						<s:textfield  onclick="WdatePicker({el:$dp.$('projectRecord.hostingNextstartday')})"  name="projectRecord.hostingNextendday" maxlength="50" size="25" /></td>
				</tr>
				<tr>
					<th align="left" >负责人</th>
					<td >
						<s:textfield  onclick="WdatePicker({el:$dp.$('projectRecord.hostingNextendday')})"  name="projectRecord.hostingNextendday" maxlength="50" size="25"  /></td>
					<th >工作班成员：</th>
					<td >
						<s:textfield name="projectRecord.hostingNextdays"  datatype="Number" maxlength="50" size="25" msg="次年举办期限必须输入整数。" /></td>
				</tr>
				<tr>
				  <th colspan="4" align="left" >变压器班</th>
   </tr>
				<tr>
				  <th align="left" >负责人</th>
				  <td ><s:textfield  onclick="WdatePicker({el:$dp.$('projectRecord.hostingNextendday')})"  name="projectRecord.hostingNextendday" maxlength="50" size="25"  /></td>
				  <th >工作班成员：</th>
				  <td >&nbsp;</td>
   </tr>
				<tr>
				  <th align="left" >&nbsp;</th>
				  <td >&nbsp;</td>
				  <th >&nbsp;</th>
				  <td >&nbsp;</td>
   </tr>
				<tr>
				  <th align="left" >&nbsp;</th>
				  <td >&nbsp;</td>
				  <th >&nbsp;</th>
				  <td >&nbsp;</td>
   </tr>
</table>
   </form>
  </body>
</html>
<script language="javascript">
	 // 保存
     function comt(){
        if(!Validator.Validate(frmM,1)){
			return false;
		}
     	document.frmM.action = "<%=contextPath%>/projectImplement!save.do";
     	document.frmM.submit();
     }
     
     // 返回
     function back() {
        
     	 document.frmM.action = "<%=contextPath%>/projectImplementList!getList.do";
		 document.frmM.submit();
     }
  
  /*   function tt(){
     
     xhr.open("POST", "jdzs-find.action?id=" + id, false);
				xhr.onreadystatechange = function() {

	                if(xhr.readyState == 4 && xhr.status == 200) {
	                
	                    var entity = eval("(" + xhr.responseText + ")");

	                    for (var p in entity) {
	                    
							try {
							
								if (document.getElementById("jdzs." + p).type == "checkbox") {

									if (entity[p] != null) {
										document.getElementById("jdzs." + p).checked = true;
									}
							
								} else {

			 						document.getElementById("jdzs." + p).value = (entity[p] == null ? "" : entity[p]);
			 					}
								
							} catch (e) {
	
								try {
									//alert(document.getElementById(p) + "=" + rzqyzs[p]);
									document.getElementById(p).value = (entity[p] == null ? "" : entity[p]);
									document.getElementById(p).disabled = true;
								} catch (e) {
								
								}
							}
						}

						// 去掉日期的小时分秒
						document.getElementById("jdzs.jdrq").value  = document.getElementById("jdzs.jdrq").value.replace("T00:00:00","");
						document.getElementById("jdzs.yxrq").value  = document.getElementById("jdzs.yxrq").value.replace("T00:00:00","");
						
					 
			           

	                }
	           	};
	           	
	           	xhr.send(null);
	           	
				// 设置readonly项目
				setReadonlyByState();

			}*/
     
 

</script>
